package com.springboot.wisdom.mqtt.service;

import com.springboot.wisdom.mqtt.gateway.MqttGateway;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class MqttMessageSender {

    @Autowired
    private MqttGateway mqttGateway;

    public void sendMsg(String topic, String msg) {
        mqttGateway.sendMsgMqtt(topic, msg);
    }

    public void sendMsg(String topic, int qos, String msg) {
        mqttGateway.sendMsgMqtt(topic, qos, msg);
    }
}
